<script setup lang="ts">
import { useAuthStore } from '@/store/modules/auth';
import { $t } from '@/locales';

defineOptions({
  name: 'LockScreen'
});

const authStore = useAuthStore();

function handlePositiveClick() {
  authStore.resetStore();
}

function handleConfirmLock() {
  window.$dialog?.info({
    title: $t('common.lock'),
    content: $t('common.lockTip'),
    positiveText: $t('common.confirm'),
    negativeText: $t('common.cancel'),
    onPositiveClick: handlePositiveClick
  });
}
</script>

<template>
  <ButtonIcon :tooltip-content="$t('common.lock')" @click="handleConfirmLock">
    <SvgIcon icon="ph:lock" class="text-icon-large" />
    <span class="text-16px font-medium"></span>
  </ButtonIcon>
</template>

<style scoped></style>
